//***********************************************************************
//	File:		Tesla.h
//	Author:		
//	Course:		SGP 1405
//	Purpose:	
//***********************************************************************
//***********************************************************************
//	Purposfully left blank for all comments regarding this file 
//	
//	
//	
//***********************************************************************



#pragma once
#include "Projectile.h"
#include <list>

class Emitter; 

class Tesla :
	public Projectile
{
public:
	//Trilogy
	Tesla(float posX = -1, float posY = -1, Entity* owner = nullptr);
	~Tesla() = default;
	Tesla(const Tesla&) = default;
	Tesla& operator = (const Tesla&) = default;

	//Type
	int GetType() const { return ENT_TESLA; }

	//Interface
	void Update(float dt);
	void Render();
	void HandleCollision(const IEntity* pOther);
	void HandleEvent();
	SGD::Rectangle GetRect() const;

	//Special Tesla 
	void FindTarget(); 

	//Accessors
	std::list<Entity*>	GetTargetsHit		(void)					{ return m_pTargetsHit; }
	float				GetRange			(void)					{ return m_fRange; }
	Emitter*			GetElectricEffect	(void)					{ return m_peElectricEffect; }

	//Mutators
	void				SetTargetsHit		(std::list<Entity*> th)	{ m_pTargetsHit = th; }
	void				SetRange			(float range)			{ m_fRange = range; }
	void				SetElectricEffect	(Emitter* ee)			{ m_peElectricEffect = ee; }

private:
	std::list<Entity*>		m_pTargetsHit; 
	float		m_fRange			= 0.0f;
	Emitter*	m_peElectricEffect; 
};

